package com.link.base.base.address.service;

import com.link.base.base.address.model.AddrPst;
import com.link.core.basic.query.QueryParams;
import com.link.core.basic.service.BasicService;
import com.link.core.basic.service.BasicServiceException;

import java.util.List;
/**
 * Copyright  hande Company. All Rights Reserved.
 *
 * @author  unknwon
 * @date:   2018/11/8 10:21
 * @version 1.0
 */

public interface AddrPstService extends BasicService<AddrPst> {
    /**
     * 省市县地址缓存 key值
     */
    public static final String ADDR_CACHE_KEY = "ADDR_PST_CACHE";

    /**
     * 查询下级地址
     *
     * @param qps
     * @return
     * @throws BasicServiceException
     */
    public List<AddrPst> queryChildAddrListSelect(QueryParams qps) throws BasicServiceException;

    /**
     * 查询所有
     * @param record
     * @return
     * @throws BasicServiceException
     */
    public List<AddrPst> queryByExample(AddrPst record) throws BasicServiceException;

    /**
     * <p>Description</p>
     *
     * @author yrf
     * @param forceRefresh 为true则强制刷新
     * @param corpId       账套id
     * @throws Exception
     */
    public void cacheAddrPst(boolean forceRefresh, Long corpId) throws Exception;

}
